package com.mew.sas.config;

import com.zebra.common.concurrent.ZebraExecutorManager;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;


@Component
@Order(1)
@Slf4j
public class StartInitialize implements ApplicationRunner {

    @Autowired
    private StartGameConfigService startGameConfigService;


    @Override
    public void run(ApplicationArguments args) throws Exception {
        ZebraExecutorManager.getInstance().start(0);
        start();
    }

    public void start() throws Exception {
        startGameConfigService.startLoad();
    }


}
